<?php 
function login($login)
{
	if(!isset($_SESSION['accounts']))
	{
		echo '<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />';
		echo "<script type='text/javascript'>alert('$login');location.href='http://www.yp6868.com/agent_admin/login.html'</script>";die;
	}
}

function achieve($games_users,$gems2)
{
	echo '<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />';
	echo "<script type='text/javascript'>alert('您已赠送给玩家 {$games_users[0]['name']} 钻石 {$gems2} 个,已成功');location.href='http://www.yp6868.com/agent_admin/searchplayer.html'</script>";die;
}

function error($error)
{
	echo '<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />';
	echo "<script type='text/javascript'>alert('$error');location.href='http://www.yp6868.com/agent_admin/searchplayer.html'</script>";die;
}

function error_add($error)
{
	echo '<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />';
	echo "<script type='text/javascript'>alert('$error');history.go(-1)</script>";die;
}

function myadmin($error)
{
	echo '<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />';
	echo "<script type='text/javascript'>alert('$error');location.href='http://www.yp6868.com/agent_admin/myadmin.html'</script>";die;
}

function myadmin_login($error)
{
	echo '<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />';
	echo "<script type='text/javascript'>alert('$error');location.href='http://www.yp6868.com/agent_admin/login.html'</script>";die;
}

function reward($error)
{
	echo '<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />';
	echo "<script type='text/javascript'>alert('$error');location.href='http://www.yp6868.com/agent_admin/reward.html'</script>";die;
}

function subordinate($error)
{
	echo '<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />';
	echo "<script type='text/javascript'>alert('$error');location.href='http://www.yp6868.com/agent_admin/subordinate.html'</script>";
}

function error_add_four($singleAgentInfo,$gems2)
{
	echo '<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />';
	echo "<script type='text/javascript'>alert('您已赠送给玩家 {$singleAgentInfo['username']} 钻石 {$gems2} 个,已成功');location.href='http://www.yp6868.com/agent_admin/myadmin.html'</script>";die;
}

function indexx($error)
{
	echo '<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />';
	echo "<script type='text/javascript'>alert('$error');location.href='http://www.yp6868.com/agent_admin/index.html'</script>";;die;
}

function policy($error)
{
	echo '<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />';
	echo "<script type='text/javascript'>alert('$error');location.href='http://www.yp6868.com/agent_admin/policy.html'</script>";die;
}

function  shanghai(&$m=10){     //已经给 shanghai()函数里的 $m赋了值是10
     $m=$m*100+10;         // 形参
  echo '$m='.$m; }   
//$m=100;                           //实参 $m是 100












?>